home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
015a
/
fdate61a.zip
/
DO-ONCE.BAT
next >
Wrap
DOS Batch File
|
1992-02-15
|
2KB
|
42 lines
@echo off
cls
REM -------------------------------------------------------------------
REM Run daily processing once a day. Put this code in AUTOEXEC.BAT.
REM This batch file requires DOS 3.3+, since it uses CALL.
REM -------------------------------------------------------------------
if not exist C:\LASTRUN.BAT goto RunNow
rem get the date when this was last run
rem ------------------------------------------------------------------
call C:\LASTRUN.BAT
rem compare the date when this was last run to today's date
rem ------------------------------------------------------------------
Fdate /Fcomp /At /B%LastRun% /Vcomp
rem if today's date is greater than the date when this was last run,
rem then run the once-a-day processing now
rem ------------------------------------------------------------------
IF (%COMP%)==(GT) goto RunNow
goto NoRun
:RunNow
rem First, record the fact that this processing was run today
rem ----------------------------------------------------------------
Fdate /Ff /Omm-dd-ccyy /At /P"@set LastRun=">C:\LASTRUN.BAT
rem Second, run the jobs that should be run only once a day.
rem ----------------------------------------------------------------
REM REPLACE THE FOLLOWING LINES WITH LINES TO RUN THE JOBS THAT YOU
REM WANT RUN ONCE A DAY...........
echo RUNNING ONCE A DAY PROCESSING: Job 1
echo RUNNING ONCE A DAY PROCESSING: Job 2
echo RUNNING ONCE A DAY PROCESSING: ............. etc.
:NoRun
set LastRun=
set comp=